﻿<%@ page title="查看提货历史" language="C#" masterpagefile="baseMasterPage.master" autoeventwireup="true" inherits="usercardinfo, App_Web_ux7swhls" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
    .cardinfo{
        margin: auto;
        width: 580px;
        font-weight: normal;
    }
    span.cardnum{font-size:14px;font-weight:bold;color:blue;font-family:Arial}
    td.field{width:120px;font-weight:bold;font-size:14px}
.cardinfo td{vertical-align : top;padding:8px;font-size:14px}

.row1{background-color:#f7f7f7}

/*提货人信息表单*/
#formtihuokacard table{margin:auto}
#formtihuokacard td{text-align:left}
#address{width:450px}

</style>
<script type="text/javascript">
    $(document).ready(function() {
        $(".cardinfo tr:odd").addClass("row1")
        $(".cardinfo tr:even").addClass("row2");

        $("span.state").each(function() {
            $(this).text($card.state2text($(this).text()));

        });

        var t = "truename,phone,address,postcode".split(",");
        var i;
        for (i = 0; i < t.length; i++) {
            $("#" + t[i]).val($("#ctl00_ContentPlaceHolder1_" + t[i] + "_text").text());
        }
        $form.focusCheckbox("sex", $("#ctl00_ContentPlaceHolder1_sex_text").text());

        __reanderlinkproduct();
    });


    function __activetihuo(evt) {
        var r = jsformcheck(evt, "formtihuokacard");

        return r;

    }

    function __tihuo_updateinfo() {
        $('#dialog').dialog({
            autoOpen: true,
            width: 650,
            resizable: false,
            modal: true,
            title: "修改提货信息"
        });
    }

    //挂接商品
    function __reanderlinkproduct() {
        var v = $card.queryCardTypeByCardTypeId($("#cardtypeid_text").text());
        if (v[0].productids) {
            $ajax.load({ url: "admin/xmlproduct.aspx", data: "json=json&productid=" + unescape(v[0].productids), type: "json", method: "GET" });

            var i, _html = "<ol>";
            for (i = 0; i < $ajax.responseJson.length; i++) {

                _html += "<li id=\"p" + $ajax.responseJson[i].productid + "\"><div class=\"pic1\"><a href=\"" + $ajax.responseJson[i].showpageurl + "?productid=" + $ajax.responseJson[i].productid + "\" target=\"_blank\"><img src=\"" + unescape($ajax.responseJson[i].picpath1) + "\"/></a></div><a class=\"productname\" href=\"" + $ajax.responseJson[i].showpageurl + "?productid=" + $ajax.responseJson[i].productid + "\" target=\"_blank\">" + unescape($ajax.responseJson[i].productname) + "</a></li>"
            }
            _html += "</ol>";
            $("#linktoproduct").html(_html);

        }
    }

</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <span id="cardtypeid_text" style="display:none"><span id="cardtypeid_text" runat="server"></span></span>
    <div class="fieldset"><span class="legend">卡信息</span></div>
    <table class="cardinfo">
        <tr>
            <td class="field">卡号：</td>
            <td><span id="cardnum_text" runat="server" class="cardnum"></span></td>
        </tr>
        <tr>
            <td class="field">卡状态：</td>
            <td><span id="state_text" runat="server" class="state"></span></td>
        </tr>
        <tr>
            <td class="field">申请提货时间：</td>
            <td><span id="submittime_text" runat="server"></span></td>
        </tr>
        <tr>
            <td class="field">提货人信息：</td>
            <td>
                <p>姓名：<span id="truename_text" runat="server"></span></p>
                <p>性别：<span id="sex_text" runat="server"></span></p>
                <p>联系电话：<span id="phone_text" runat="server"></span></p>
                <p>寄送地址：<span id="address_text" runat="server"></span></p>
                <p>邮编：<span id="postcode_text" runat="server"></span></p>
                <div id="ui_tihuo_updateinfo" runat="server" visible="false">
                    <input type="button" value="更改提货人信息" onclick="javascript:__tihuo_updateinfo();"/>
                </div>
            </td>
        </tr>
        <tr>
            <td class="field">寄送信息：</td>
            <td>
                <p>发货时间：<span id="expresstime" runat="server"></span></p>
                <p>快递公司：<span id="express" runat="server"></span></p>
                <p>快递单号：<span id="expressnum" runat="server"></span></p>
            </td>
        </tr>
    </table>
    <br />
    <div class="fieldset"><span class="legend">此卡的礼品包含有以下商品</span></div>
    <br />
    <div id="linktoproduct" class="goodslist"></div>
    <div id="dialog" class="X-dialog">
        <form id="formtihuokacard" onsubmit="javascript:return __activetihuo_updateinfo(event);" action="usertihuo_updateinfo_action.aspx" method="post">
            <div class="fieldset"><span class="legend">请填写收货信息</span></div>
            <table>
                <tr>
                    <td>姓名</td>
                    <td><input type="text" id="truename" name="truename" nullabled="false" maxlength="50" datatype="string" alerttext="姓名"/></td>
                </tr>
                <tr>
                    <td>性别</td>
                    <td><input type="radio" name="sex" nullabled="false" alerttext="请选择性别" value="男"/>男<input type="radio" name="sex" value="女"/>女</td>
                </tr>
                <tr>
                    <td>联系电话</td>
                    <td><input type="text" id="phone" name="phone" nullabled="false" maxlength="50" datatype="string" alerttext="联系电话"/></td>
                </tr>
                <tr>
                    <td>收货地址</td>
                    <td><input type="text" id="address" name="address" nullabled="false" maxlength="255" datatype="string" alerttext="收货地址"/></td>
                </tr>
                <tr>
                    <td>邮编</td>
                    <td><input type="text" id="postcode" name="postcode" nullabled="false" maxlength="50" datatype="string" alerttext="邮编"/></td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <input type="submit" value="提交" class="btn2" />
                    </td>
                </tr>
            </table>
        </form>
    </div>
</asp:Content>

